package max.ta.stock.plot;

import java.util.List;

import max.ta.data.entity.StockQuote;
import max.ta.data.plot.TimeSeriesChartPlotter;
import max.ta.stock.plot.data.StockPointSetBuilder;

public class StockTimeSeriesPlotter {

    private static final boolean ENABLE_CLOSE = true;
    private final StockPointSetBuilder builder = new StockPointSetBuilder();


    public StockTimeSeriesPlotter() {
	super();
	showClose(ENABLE_CLOSE);
    }

    public void plot(String symbol, List<StockQuote> quotes) {
	final TimeSeriesChartPlotter plotter = new TimeSeriesChartPlotter(symbol + " Stock");
	builder.buildSeries(quotes);
	plotter.plot(builder.getStockData());
    }

    public void showOpen(boolean enableOpen) {
	builder.setEnableOpen(enableOpen);
    }

    public void showLow(boolean enableLow) {
	builder.setEnableLow(enableLow);
    }

    public void showHigh(boolean enableHigh) {
	builder.setEnableHigh(enableHigh);
    }

    public void showClose(boolean enableClose) {
	builder.setEnableClose(enableClose);
    }

    public void showVolume(boolean enableVolume) {
	builder.setEnableVolume(enableVolume);
    }


}
